Skip to content

[FLINK-38262][table] show create connection operation - #28791

Open
Shekharrajak wants to merge 3 commits into
apache:masterfrom
Shekharrajak:FLINK-38262-show-create-connection-operation
Open

[FLINK-38262][table] show create connection operation#28791
Shekharrajak wants to merge 3 commits into
apache:masterfrom
Shekharrajak:FLINK-38262-show-create-connection-operation

Conversation

@Shekharrajak

@Shekharrajak Shekharrajak commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Adds resolved connection lookup and SHOW CREATE CONNECTION support, formatting connection DDL while filtering internal/sensitive options.

Brief change log

Add SHOW CREATE CONNECTION operation

Verifying this change

Unit tests and IT

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no) no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no) no
  • The serializers: (yes / no / don't know) no
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know) no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) no
  • The S3 file system connector: (yes / no / don't know) no

Documentation

  • Does this pull request introduce a new feature? (yes / no) yes
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Was generative AI tooling used to co-author this PR?
  • Yes

@flinkbot

flinkbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@Shekharrajak
Shekharrajak force-pushed the FLINK-38262-show-create-connection-operation branch from 1683711 to 0b21c6e Compare July 21, 2026 17:16

@snuyanzin snuyanzin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not ignore Contributors form

Comment on lines +377 to +387
static Optional<String> extractComment(CatalogConnection connection) {
return StringUtils.isEmpty(connection.getComment())
? Optional.empty()
: Optional.of(connection.getComment());
}

static Map<String, String> withoutConnectionInternalOptions(Map<String, String> options) {
return options.entrySet().stream()
.filter(entry -> !CONNECTION_SECRET_REFERENCE_KEY.equals(entry.getKey()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be private

private static final DateTimeFormatter TIMESTAMP_FORMATTER =
DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss");
private static final String PRINT_INDENT = " ";
private static final String CONNECTION_SECRET_REFERENCE_KEY = "__flink.encrypted-secret-key__";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate what this const is? Maybe add a one line comment why we filtering it out.

@raminqaf raminqaf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Left some comments

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jul 27, 2026
Shekharrajak and others added 2 commits July 27, 2026 21:31
…k/table/catalog/CatalogManager.java

Co-authored-by: Ramin Gharib <ramingharib@gmail.com>
…k/table/catalog/CatalogManager.java

Co-authored-by: Ramin Gharib <ramingharib@gmail.com>

@snuyanzin snuyanzin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change ShowCreateUtil then there should be tests in ShowCreateUtilTests with pure sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants